package com.ruiben.mall.impl;

import com.ruiben.mall.IUserOrderService;
import com.ruiben.mall.mapper.UserOrderProductMapper;
import com.ruiben.mall.pojo.ShopProduct;
import com.ruiben.mall.pojo.UserOrderProduct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class UserOrderProductServiceImpl implements IUserOrderService {

    @Autowired
    private UserOrderProductMapper userOrderProductMapper;

    @Override
    public List<UserOrderProduct> getGoodslistForOrderId(String orderId) {
        Example example = new Example(UserOrderProduct.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("orderid",orderId);
        return userOrderProductMapper.selectByExample(example);
    }
}
